#include <stdio.h>
#include <stdlib.h>
#include <math.h>

unsigned short prime_list[103];

int prime(unsigned short num);
int is_prime(unsigned short);
void prime_list_create();

int main()
{
    //prime_list_create();
    int m = 2;
    int n = 2;
    int sum = 0;
    int cnt = 0;
    scanf("%d %d", &m, &n);
    for(int i = m; i <= n; i++)
    {
        if (prime(i))
        {
            sum += i;
            cnt++;
        }
    }
    printf("cnt:%d;sum:%d\n", cnt, sum);
    return 0;
}

int prime(unsigned short num)
{
    return is_prime(num);
}

int is_prime(unsigned short num)
{
    for(unsigned short i = 2; i <= sqrt(num); i++)
    {
        if (num % i == 0) return 0;
    }
    return 1;
}

void prime_list_create()
{
    unsigned short num = 2;
    unsigned short * flag = prime_list;
    unsigned short cnt = 0;
    for (unsigned short i = 2; i < 500; i++)
    {
        if(is_prime(i))
        {
            *flag = i;
            flag++;
            printf("%d\n", i);
            cnt++;
        }
    }
    printf(":%d\n",cnt);
}
